def countNum(list):
    if list == []:
        return 0
    return 1 + countNum(list[1:])

print countNum([1, 4, 5])